<!DOCTYPE html>
<html>
<head>
    <title>{$site.title} - {:lang('Member center')} - {:lang('Reset password')}</title>

    {include file="user/common/head"}

    <style>
        .login-page {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
        }
        h3 {
            font-size: 16px;
            font-weight: bold;
        }
    </style>
</head>
<body>
{include file="user/common/menu"}

<div class="login-page">
    <div class="login-box">
        <div class="card">
            <div class="card-body login-card-body">
                <form action="" method="post" class="frm-operate">
                    <h3 class="mb-3">{:lang('Reset password')}</h3>
                    <div class="form-group">
                        <lable>{:lang('Email')}/{:lang('Mobile')}</lable>
                        <div class="mt-1">
                            <input type="text" class="form-control" name="username" data-rule="required ">
                        </div>
                    </div>
                    <div class="form-group">
                        <div>
                            <div class="input-group m-0">
                                <input type="text" class="form-control" placeholder="{:lang('verification code')}" name="code" data-rule="required ">
                                <div class="input-group-append">
                                    <a href="#" class="refresh"><img src="{:url('/user.user/verify')}" style="width: 108px" /></a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="status" value="1">
                    <div class="social-auth-links text-center mb-4">
                        <input type="submit" class="btn btn-block btn-primary btn-submit" value="{:lang('Next')}" />
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

{include file="user/common/footer"}
<script>
    require(['jquery','bootstrap','layer','Form'], function ($,undefined,layer,Form) {
        // 刷新验证码
        $('.refresh').click(function (e) {
            e.preventDefault();
            $(this).find('img').attr('src',"{:url('/user.user/verify')}?r="+Math.random());
        });

        Form.api.init({success:function (data, response) {
                window.location.href = response.url;
                return false;
            }});
    })
</script>

</body>
</html>